<% content_for :subnav do %>
  <a href="/settings">Back to Settings</a>
<% end %>

<div class="box wide">
  <%= form_with url: twofa_update_url do |f| %>
    <p>
    To enable Two-Factor Authentication on your account using your new TOTP
    secret, enter the six-digit code from your TOTP application:
    </p>

    <div class="boxline">
      <%= f.label :totp_code, "TOTP Code:", :class => "required" %>
      <%= f.text_field :totp_code,
        :inputmode => "numeric",
        :pattern => "[0-9]+",
        :size => 10,
        :autocomplete => "one-time-code",
        :autofocus => true,
        :class => "totp_code" %>
    </div>

    <p>
    <%= f.submit "Verify and Enable" %>
    </p>
  <% end %>
</div>
